import requets from "@/uilts/requets/index.js";

// 登录接口
function login(data) {
	return requets({
		url: '/wx/login',
		method: 'post',
		data
	})
}

// 周一排班
function mondayDuty(data) {
	return requets({
		url: '/main/one',
		method: 'post',
		data
	})
}

// 周二排班
function tuesdayDuty(data) {
	return requets({
		url: '/main/two',
		method: 'post',
		data
	})
}


// 周三排班
function wednesdayDuty(data) {
	return requets({
		url: '/main/three',
		method: 'post',
		data
	})
}


// 周四排班
function thursdayDuty(data) {
	return requets({
		url: '/main/four',
		method: 'post',
		data
	})
}


// 周五排班
function fridayDuty(data) {
	return requets({
		url: '/main/five',
		method: 'post',
		data
	})
}
// 周六排班
function saturdayDuty(data) {
	return requets({
		url: '/main/six',
		method: 'post',
		data
	})
}

// 周日排班
function sundayDuty(data) {
	return requets({
		url: '/main/seven',
		method: 'post',
		data
	})
}

// 科室列表
function departmentList(data) {
	return requets({
		url: '/department/departmentList',
		method: 'get',
		data
	})
}


// 挂号类型列表
function registeredTypeList(data) {
	return requets({
		url: '/registeredType/registeredTypeList',
		method: 'get',
		data
	})
}

// 挂号
function addre(data, params) {
	return requets({
		url: `/cao/addreApp?${params}`,
		method: 'post',
		data
	})
}


// 选择医生
function seldoctor(data) {
	return requets({
		url: `/cao/seldoctor`,
		method: 'get',
		data
	})
}

// 获取挂号费
function seltymo(data) {
	return requets({
		url: '/cao/seltymo',
		method: 'get',
		data
	})
}

// 获取挂号费
function registerList(data) {
	return requets({
		url: '/caotake/selhuan',
		method: 'get',
		data
	})
}

// 获取取药人列表
function mohuList(data) {
	return requets({
		url: '/caocc/mohu',
		method: 'get',
		data
	})
}


// 获取药列表
function selpepiList(data) {
	return requets({
		url: '/caocc/selpepi',
		method: 'get',
		data
	})
}

// 获取出库
function chuku(data) {
	return requets({
		url: '/caotake/chuku',
		method: 'get',
		data
	})
}

// 判断有没有登录
function isLogin(data) {
	return requets({
		url: '/user/is-login',
		method: 'POST',
		data
	})
	
}

// 判断用户是否重复
function isRepeatUser(data) {
	return requets({
		url: `/cao/phone?phone=${data.phone}&carid=${data.carid}`,
		method: 'POST',
		data
	})
	
} 

function messageList(data) {
	return requets({
		url: '/noticeInfo/select',
		method: 'get',
		data
	})
}

function addFeedback(data) {
	return requets({
		url: '/feedbackRecord/insert',
		method: 'post',
		data
	})
}

function uploadFile(data) {
	return requets({
		url: '/common/upload/upload',
		method: 'post',
		data
	})
}






export {
	login,
	mondayDuty,
	tuesdayDuty,
	wednesdayDuty,
	thursdayDuty,
	fridayDuty,
	saturdayDuty,
	sundayDuty,
	departmentList,
	registeredTypeList,
	addre,
	seldoctor,
	seltymo,
	registerList,
	mohuList,
	selpepiList,
	chuku,
	isLogin,
	isRepeatUser,
	messageList,
	addFeedback,
	uploadFile
}